kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-pub/xbackward
    REF 51f0700452cf71c57d43c2d028277b24cde32502 # 2023-11-24
    SHA512 c7671b65f0c79b0f87c8bfa5b54e5a67c4a47867013946c7834b7669860df5c7e78622cd13118aa00a584d5b7bc661c8faa41d8ce19bf843546533948d6832d5
    HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
      -DBACKWARD_TESTS=OFF
)
kmpkg_cmake_install()
kmpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/backward)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
